﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctrBaiVietCreate.ascx.cs"
    Inherits="TCHSHue.Modules.AdminControl.BaiViet.ctrBaiVietCreate" %>
<%--<script src="../../../Scripts/ckeditor.js" type="text/javascript"></script>
<script>
    var textArea = $(".ckeditor");
    for (var i = 0; i < textArea.length; i++) {
        CKEDITOR.replace($(textArea[i]).attr('id'),
	    {
    	    toolbar: 'Full'
	    });
    }
</script>--%>
<script src="../../../Scripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script type="text/javascript">
    tinyMCE.init({
        // General options
        mode: "textareas",
        theme: "advanced",
        plugins: "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",

        // Theme options
        theme_advanced_buttons1: "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: true,

        // Example content CSS (should be your site CSS)
        content_css: "../../../Style/CSS/IndexLayout.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url: "lists/template_list.js",
        external_link_list_url: "lists/link_list.js",
        external_image_list_url: "lists/image_list.js",
        media_external_list_url: "lists/media_list.js",

        // Style formats
        style_formats: [
			{ title: 'Bold text', inline: 'b' },
			{ title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },
			{ title: 'Red header', block: 'h1', styles: { color: '#ff0000'} },
			{ title: 'Example 1', inline: 'span', classes: 'example1' },
			{ title: 'Example 2', inline: 'span', classes: 'example2' },
			{ title: 'Table styles' },
			{ title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
		],

        // Replace values for the template plugin
        template_replace_values: {
            username: "Some User",
            staffid: "991234"
        }
    });
</script>
<link href="../../../Style/CSS/sample.css" rel="stylesheet" type="text/css" />
<%--<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>--%>
<%@ Register Assembly="IZ.WebFileManager" Namespace="IZ.WebFileManager" TagPrefix="iz" %>
<div id="lk" class="inbox">
    <h3 class="tieude">
        <asp:Label ID="lbCreate" runat="server" Text="Thêm mới/Cập nhật"></asp:Label>
    </h3>
    <table style="width: 100%">
        <tr>
            <td colspan="2" class="line">
            </td>
        </tr>
    </table>
    <br />
    <div>
        <table>
            <tr>
                <td>
                    <b>Thể loại</b>
                </td>
                <td>
                    <asp:DropDownList ID="ddlTheLoai" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <b>Tiêu đề</b>
                </td>
                <td>
                    <asp:TextBox ID="txtTieuDe" CssClass="textWidth" runat="server"></asp:TextBox>
                    <br />
                    <asp:RequiredFieldValidator ControlToValidate="txtTieuDe" ID="RequiredFieldValidator1"
                        runat="server" ErrorMessage="Bạn chưa nhập tiêu đề" ToolTip=""></asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
        <p style="font-weight: bold">
            Nội dung tóm tắt</p>
        <asp:TextBox ID="txtNoiDungTomTat" TextMode="MultiLine" CssClass="ckeditor" runat="server"></asp:TextBox>
        <p style="font-weight: bold">
            Nội dung</p>
        <i style="color: red">Để chèn tài liệu, thêm đường dẫn sau vào trước tên tài liệu: <b>
            ../Upload/Document_Image/Document/(tên tài liệu)</b></i><br />
        <i style="color: red">Để chèn ảnh, thêm đường dẫn sau vào trước tên tài liệu: <b>../Upload/Document_Image/Image/(tên
            ảnh)</b></i>
        <br />
        <asp:TextBox ID="txtNoiDung" TextMode="MultiLine" CssClass="ckeditor" runat="server"></asp:TextBox>
        <br />
        <div id="divTinhTrang">
            <table>
                <tr>
                    <td>
                        <b>Ảnh đại diện</b>
                    </td>
                    <td style="width: 100px">
                        <asp:Image ID="imgDaiDien" ImageUrl="~/Upload/ImageArticle/no_image.jpg" Width="200px"
                            Height="200px" runat="server" />
                        <asp:FileUpload ID="anhDaiDienUpload" runat="server" /><asp:Label Visible="false"
                            ID="lbThongBaoAnh" runat="server" Text="Thông báo upload"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Tình trạng</b>
                    </td>
                    <td style="width: 100px">
                        <asp:CheckBox ID="ckhTinhTrang" runat="server" />Duyệt
                    </td>
                </tr>
               <%-- <tr>
                    <td>
                        <b>Làm nổi bật</b>
                    </td>
                    <td style="width: 100px">
                        <asp:CheckBox ID="ckhNoiBat" runat="server" />
                    </td>
                </tr>--%>
                <tr>
                    <td>
                    </td>
                    <td>
                        <br />
                        <asp:Button CssClass="customBNT" ID="bntLuu" runat="server" Text="Lưu" OnClick="bntLuu_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div visible="false" class="ui-widget" id="thongBao" runat="server">
        <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
            <p>
                <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
                <asp:Label ID="lbThongBao" runat="server" Text="Thêm mới/Cập nhật thất bại"></asp:Label></p>
        </div>
    </div>
    <br />
    <asp:HyperLink ID="HyperLink1" CssClass="box back" NavigateUrl="~/Modules/Admin.aspx?mode=baiviet"
        runat="server">Quay lại</asp:HyperLink>
    <br />
    <br />
</div>
<br />
<div id="Div1" class="inbox">
    <h3 class="tieude">
        <asp:Label ID="Label1" runat="server" Text="TÀI NGUYÊN"></asp:Label>
    </h3>
    <table style="width: 100%">
        <tr>
            <td colspan="2" class="line">
            </td>
        </tr>
    </table>
    <br />
    <iz:FileManager ID="FileManager1" runat="server" SkinID="VS2005" Height="400px" Width="600">
        <RootDirectories>
            <iz:RootDirectory DirectoryPath="~/Upload/Document_Image" Text="Documents" />
        </RootDirectories>
    </iz:FileManager>
</div>
